package com.credithc.eagleeye.demo.feign;
import com.credithc.eagleeye.demo.vo.ResponseVo;
import com.credithc.eagleeye.demo.vo.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
 * 描 述: <br/>
 * 作 者: zhangjin<br/>
 * 创 建：2019年10月15日<br/>
 * 版 本：v1.0.0<br>
 * <p>
 * 历 史: (版本) 作者 时间 注释 <br/>
 */
@FeignClient(name = "baiduFeign",url = "http://localhost:8001",fallback = DemoServiceUrlClientFallBack.class)
public interface DemoServiceUrlClient {
    @GetMapping("/hello")
    public String hello(@RequestParam(name = "name") String name);
    @PostMapping("/hello2")
    @ResponseBody
    public ResponseVo<UserVo> hello2(@RequestBody UserVo userVo);
}
